<?php
/**
 * Created by PhpStorm.
 * User: Nevena i Milena
 * Date: 2/22/14
 * Time: 5:41 PM
 */

class Ispit implements JsonSerializable{
    private $student;
    private $predmet;
    private $ocena;

    function __construct($ocena, $predmet, $student)
    {
        $this->ocena = $ocena;
        $this->predmet = $predmet;
        $this->student = $student;
    }

    /**
     * @param mixed $ocena
     */
    public function setOcena($ocena)
    {
        $this->ocena = $ocena;
    }

    /**
     * @return mixed
     */
    public function getOcena()
    {
        return $this->ocena;
    }

    /**
     * @param mixed $predmet
     */
    public function setPredmet($predmet)
    {
        $this->predmet = $predmet;
    }

    /**
     * @return mixed
     */
    public function getPredmet()
    {
        return $this->predmet;
    }

    /**
     * @param mixed $student
     */
    public function setStudent($student)
    {
        $this->student = $student;
    }

    /**
     * @return mixed
     */
    public function getStudent()
    {
        return $this->student;
    }


    /**
     * (PHP 5 &gt;= 5.4.0)<br/>
     * Specify data which should be serialized to JSON
     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
     * @return mixed data which can be serialized by <b>json_encode</b>,
     * which is a value of any type other than a resource.
     */
    public function jsonSerialize()
    {
        return (object) get_object_vars($this);
    }
}
